package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.ACheckMapper;
import com.ruoyi.system.domain.ACheck;
import com.ruoyi.system.service.IACheckService;

/**
 * 打卡类别Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-05-29
 */
@Service
public class ACheckServiceImpl implements IACheckService 
{
    @Autowired
    private ACheckMapper aCheckMapper;

    /**
     * 查询打卡类别
     * 
     * @param id 打卡类别主键
     * @return 打卡类别
     */
    @Override
    public ACheck selectACheckById(Long id)
    {
        return aCheckMapper.selectACheckById(id);
    }

    /**
     * 查询打卡类别列表
     * 
     * @param aCheck 打卡类别
     * @return 打卡类别
     */
    @Override
    public List<ACheck> selectACheckList(ACheck aCheck)
    {
        return aCheckMapper.selectACheckList(aCheck);
    }

    /**
     * 新增打卡类别
     * 
     * @param aCheck 打卡类别
     * @return 结果
     */
    @Override
    public int insertACheck(ACheck aCheck)
    {
        aCheck.setCreateTime(DateUtils.getNowDate());
        return aCheckMapper.insertACheck(aCheck);
    }

    /**
     * 修改打卡类别
     * 
     * @param aCheck 打卡类别
     * @return 结果
     */
    @Override
    public int updateACheck(ACheck aCheck)
    {
        aCheck.setUpdateTime(DateUtils.getNowDate());
        return aCheckMapper.updateACheck(aCheck);
    }

    /**
     * 批量删除打卡类别
     * 
     * @param ids 需要删除的打卡类别主键
     * @return 结果
     */
    @Override
    public int deleteACheckByIds(Long[] ids)
    {
        return aCheckMapper.deleteACheckByIds(ids);
    }

    /**
     * 删除打卡类别信息
     * 
     * @param id 打卡类别主键
     * @return 结果
     */
    @Override
    public int deleteACheckById(Long id)
    {
        return aCheckMapper.deleteACheckById(id);
    }

    /***
     * 小程序查询上线数据
     * @param aCheck
     * @return
     */
    @Override
    public List<ACheck> selectACheckXcxList(ACheck aCheck) {
        return aCheckMapper.selectACheckXcxList(aCheck);
    }
}
